Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: smaller cohort resource usage for replay filters #25699

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

pauldambra
Copy link
Member

@pauldambra pauldambra commented Oct 19, 2024

see (private) https://posthoghelp.zendesk.com/agent/tickets/19533 and (private) https://posthog.slack.com/archives/C03PB072FMJ/p1729252876401629

when filtering replays by cohort we were joining replay events on person_distinct_id only so we could check if a given person id is in a cohort, and the query would sometimes OOM, but certainly would be slower than necessary

we definitely don't want a join here


remaining_properties = self._strip_person_and_event_and_cohort_properties(self._filter.property_groups)
if remaining_properties:
posthoganalytics.capture_exception(UnexpectedQueryProperties(remaining_properties))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think anything in here is likely going to cause a join and impact performance, lets use exception capture to see when that happens

@pauldambra pauldambra requested review from daibhin and a team October 19, 2024 11:11
@pauldambra pauldambra changed the title fix: smaller cohort resource usage fix: smaller cohort resource usage for replay filters Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant